package com.cloud.controller;

import com.cloud.service.UserNoticeService;
import com.cloud.tools.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： linJianHong
 * @dateTime： 23:27 2022/4/23
 * @Description:
 * @ClassName:
 */

@RestController
public class CommonUserNoticeController {

    @Resource
    UserNoticeService userNoticeService;

    /* 用户查看管理员发布的公告 */
    @GetMapping(value = "/natms1/user/notice/manager")
    public CommonResult readNoticeFromManager(){
        return userNoticeService.fromManager();
    }

    /* 用户查看审核员发布的公告 */
    @GetMapping(value = "/natms1/user/notice/approval")
    public CommonResult readNoticeFromApproval(){
        return userNoticeService.fromApproval();
    }
}
